<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2023 -->
<!-- Включены элементы разработанные Health Level Seven -->
<xs:schema xmlns="urn:hl7-org:v3" xmlns:address="urn:hl7-ru:address" xmlns:fias="urn:hl7-ru:fias" xmlns:identity="urn:hl7-ru:identity" elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="fias.xsd" namespace="urn:hl7-ru:fias" />
  <xs:import schemaLocation="address.xsd" namespace="urn:hl7-ru:address" />
  <xs:import schemaLocation="identity.xsd" namespace="urn:hl7-ru:identity" />
  <xs:include schemaLocation="coreschemas/datatypes.xsd" />
  <xs:include schemaLocation="coreschemas/voc.xsd" />
  <xs:include schemaLocation="coreschemas/NarrativeBlock.xsd" />
  <xs:complexType name="POCD_MT000040.Component2">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="structuredBody" type="structuredBody_223" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="structuredBody_223">
    <xs:sequence>
      <xs:element minOccurs="3" maxOccurs="5" name="component" type="component_224" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="component_224">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="section" type="section_225" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="section_225">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_226" />
      <xs:element minOccurs="1" maxOccurs="1" name="title" type="ST" />
      <xs:element minOccurs="1" maxOccurs="unbounded" name="entry" type="entry_228" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="code_226">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="DOCINFO" />
          <xs:enumeration value="BENEFITS" />
          <xs:enumeration value="DGN" />
          <xs:enumeration value="CONSENT" />
          <xs:enumeration value="LINKDOCS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.197" />
          <xs:enumeration value="1.2.643.5.1.13.2.1.1.1504.23" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="entry_228">
    <xs:sequence>
      <xs:choice minOccurs="1">
        <xs:element minOccurs="1" maxOccurs="1" name="act" type="act_319" />
        <xs:element minOccurs="1" maxOccurs="1" name="observation" type="observation_229" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="observation_229">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_230" />
      <xs:choice minOccurs="0">
        <xs:element minOccurs="0" maxOccurs="1" name="text" type="ED" />
        <xs:element minOccurs="1" maxOccurs="1" name="effectiveTime" type="effectiveTime_272" />
      </xs:choice>
      <xs:element minOccurs="0" maxOccurs="1" name="value" type="ANY" />
      <xs:element minOccurs="0" maxOccurs="1" name="participant" type="participant_252" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassObservation">
          <xs:enumeration value="OBS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActMoodDocumentObservation">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_230">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="11003" />
          <xs:enumeration value="10000" />
          <xs:enumeration value="12524" />
          <xs:enumeration value="7020" />
          <xs:enumeration value="12129" />
          <xs:enumeration value="7016" />
          <xs:enumeration value="7017" />
          <xs:enumeration value="7025" />
          <xs:enumeration value="811" />
          <xs:enumeration value="1" />
          <xs:enumeration value="7021" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
          <xs:enumeration value="1.2.643.5.1.13.2.1.1.1504.41" />
          <xs:enumeration value="1.2.643.5.1.13.13.11.1077" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="participant_252">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="participantRole" type="participantRole_253" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ParticipationType">
          <xs:enumeration value="LOC" />
          <xs:enumeration value="IND" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="participantRole_253">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="id" type="id_254" />
      <xs:element minOccurs="1" maxOccurs="1" name="addr" type="AD" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="telecom" type="telecom_262" />
      <xs:element minOccurs="1" maxOccurs="1" name="playingEntity" type="playingEntity_263" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="RoleClassRoot">
          <xs:enumeration value="SDLOC" />
          <xs:enumeration value="UNDWRT" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="id_254">
    <xs:attribute name="root" type="uid" use="optional" />
    <xs:attribute name="extension" type="st" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
  <xs:complexType name="telecom_262">
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="value" type="url" use="required" />
    <xs:attribute name="use" type="set_TelecommunicationAddressUse" use="optional" />
  </xs:complexType>
  <xs:complexType name="playingEntity_263">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="name" type="ON" />
      <xs:element minOccurs="0" maxOccurs="1" ref="identity:Props" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" type="EntityClassRoot" use="optional" />
    <xs:attribute name="determinerCode" use="optional">
      <xs:simpleType>
        <xs:restriction base="EntityDeterminer">
          <xs:enumeration value="INSTANCE" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="name_264">
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="effectiveTime_272">
    <xs:attribute name="value" type="ts" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
  <xs:complexType name="act_319">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_320" />
      <xs:element minOccurs="0" maxOccurs="1" name="text" type="ED" />
      <xs:element minOccurs="1" maxOccurs="1" name="effectiveTime" type="effectiveTime_322" />
      <xs:element minOccurs="0" maxOccurs="3" name="entryRelationship" type="entryRelationship_323" />
      <xs:element minOccurs="1" maxOccurs="1" name="reference" type="reference_335" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActClassDocumentEntryAct">
          <xs:enumeration value="ACT" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_DocumentActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_320">
    <xs:attribute name="code" type="cs" use="required" />
    <xs:attribute name="codeSystem" type="uid" use="required" />
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="effectiveTime_322">
    <xs:attribute name="value" type="ts" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="entryRelationship_323">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="observation" type="observation_324" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipEntryRelationship">
          <xs:enumeration value="COMP" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="observation_324">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_325" />
      <xs:element minOccurs="1" maxOccurs="1" name="value" type="ANY" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassObservation">
          <xs:enumeration value="OBS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActMoodDocumentObservation">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_325">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="11002" />
          <xs:enumeration value="11003" />
          <xs:enumeration value="6058" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
          <xs:enumeration value="1.2.643.5.1.13.2.1.1.1504.41" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="reference_335">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="externalDocument" type="externalDocument_336" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipExternalReference">
          <xs:enumeration value="REFR" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="externalDocument_336">
    <xs:sequence>
      <xs:element minOccurs="2" maxOccurs="2" name="id" type="id_337" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassDocument">
          <xs:enumeration value="DOCCLIN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="id_337">
    <xs:attribute name="root" use="optional" >
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:pattern value="[0-2](\.(0|[1-9][0-9]*))*.51|1.2.643.5.1.13.13.17.1.1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="extension" type="st" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
</xs:schema>